{:load_res('js','20180303',[
'https://cdn.staticfile.org/headjs/1.0.3/head.load.min.js',
'/static/admin/js/bootstrap.min.js',
'/static/admin/plugins/pace/pace.min.js',
'/static/admin/js/jquery.slimscroll.min.js',
'/static/admin/js/adminlte.min.js',
'/static/js/jquery.form.min.js',
'/static/jquery-loading-overlay/1.5.4/loadingoverlay.min.js',
'https://cdn.staticfile.org/ladda-bootstrap/0.9.4/spin.min.js',
'https://cdn.staticfile.org/ladda-bootstrap/0.9.4/ladda.min.js',
'https://cdn.staticfile.org/vue/2.5.16/vue.js',
'https://cdn.staticfile.org/Sortable/1.6.0/Sortable.min.js'
])}
<script src="/static/layer/layer_zh-cn.js"></script>
<script src="/static/laypage/laypage.js"></script>
<script>
    function changeProject(_projectId) {
        $.post("{:url('Index/set_project')}",{id:_projectId},function (data) {
            if (data.code == 1) {
                layer.msg(data.msg, {icon: 6}, function (index) {
                    layer.close(index);
                    location.reload();
                });
            } else {
                layer.alert(data.msg, {icon: 5}, function (index) {
                    $("#verify").val('');
                    $("#verify_img").click();
                    Ladda.stopAll();
                    layer.close(index);
                });
            }
        })
    }
    function clearCache() {
        layer.confirm('确定清除缓存吗？',{icon: 3, title:'提示'}, function(cindex){
            layer.close(cindex);
            //do something
            $.get("{:url('Index/clear_cache')}",{},function (data) {
                if (data.code == 1) {
                    layer.msg(data.msg, {icon: 6}, function (index) {
                        layer.close(index);
                    });
                } else {
                    layer.alert(data.msg, {icon: 5}, function (index) {
                        layer.close(index);
                    });
                }
            })
        });

    }
</script>